<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>视频查找</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="My Play Responsive web template, Bootstrap Web Templates, Flat Web Templates, Andriod Compatible web template, 
Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, SonyErricsson, Motorola web design" />
<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
<!-- bootstrap -->
<link href="${pageContext.request.contextPath}/css/bootstrap.min.css" rel='stylesheet' type='text/css' media="all" />
<!-- //bootstrap -->
<link href="${pageContext.request.contextPath}/css/dashboard.css" rel="stylesheet">
<!-- Custom Theme files -->
<link href="${pageContext.request.contextPath}/css/style.css" rel='stylesheet' type='text/css' media="all" />
<script src="${pageContext.request.contextPath}/js/jquery-1.11.1.min.js"></script>
<!--start-smoth-scrolling-->
</head>
  <body>

 <jsp:include page="header.jsp"></jsp:include>

    <jsp:include page="menu.jsp"></jsp:include>
        <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
			<div class="main-grids">
				<div class="recommended">
					<div class="recommended-grids english-grid">
						<div class="recommended-info-xxx">
							<ul class="nav nav-set navbar-left">
		            <li>
		                <a href="#" class="active">
		                 		   搜索结果
		                </a>
		            </li>
				       </ul>
							<ul class="nav nav-set-right navbar-right">
		            <li class="dropdown">
		                <a href="#" class="dropdown-toggle" data-toggle="dropdown">
		                 		   排序 <b class="caret"></b>
		                </a>
		                <ul class="dropdown-menu">
		                    <li><a href="${pageContext.request.contextPath}/video/sort">日期</a></li>
		                    <li><a href="${pageContext.request.contextPath}/video/videoClick">播放量</a></li>
		                </ul>
		            </li>
				       </ul>
				       <div class="clearfix"> </div>
						</div>
						<c:forEach items="${pageUtil.list}" var="l">
						<div class="col-md-3 resent-grid recommended-grid sports-recommended-grid">
							<div class="resent-grid-img recommended-grid-img">
								<a href="${pageContext.request.contextPath}/video/to_play_video/${l.id}"><img src="${pageContext.request.contextPath}/${l.thumbnailUrl}" alt="" /></a>
								<div class="time small-time sports-tome sports-tome-xx">
									<p>
										<fmt:formatDate value="${l.duration }" pattern="HH:mm:ss"/>
									</p>
								</div>
								<div class="clck sports-clock">
									<span class="glyphicon glyphicon-time duration_search" aria-hidden="true"></span>
								</div>
							</div>
							<div class="resent-grid-info recommended-grid-info">
								<h5><a href="${pageContext.request.contextPath}/video/to_play_video/${l.id}" class="title">${l.name }</a></h5>
								<ul>
									<li><p class="author author-info"><a href="#" class="author">${l.user.nickname}</a></p></li>
									<li class="right-list"><p class="views views-info">${l.videoClick} views</p></li>
								</ul>
							</div>
						</div>
						</c:forEach>
						<div class="clearfix"> </div>
						<div class="row">
							<div class="col-md-4"></div>
							<div class="col-md-4">
								<ul class="pagination pagination-sm">
								    <li><a href="${pageContext.request.contextPath}/video/${sortName}?id=1">
								    	首页</a></li>
								     <li><a href="${pageContext.request.contextPath}/video/${sortName}?id=${pageUtil.pageIndex>1?pageUtil.pageIndex-1:1}">
								    &laquo;</a></li>
								    <li>
										<span>${pageUtil.pageIndex}/${pageUtil.pageNumber}</span>
									</li>
								     <li><a href="${pageContext.request.contextPath}/video/${sortName}?id=${pageUtil.pageIndex<pageUtil.pageNumber?pageUtil.pageIndex+1:pageUtil.pageNumber}">
								    &raquo;</a></li>
								     <li><a href="${pageContext.request.contextPath}/video/${sortName}?id=${pageUtil.pageNumber}">
								    末页</a></li>
								</ul><br>
							</div>
							<div class="col-md-4"></div>
						</div>
					</div>
				</div>

			</div>
			<!--利用jsp标签实现网页底部  -->
			<jsp:include page="footer.jsp"></jsp:include>
		</div>
    <script src="${pageContext.request.contextPath}/js/bootstrap.min.js"></script>
  </body>
</html>